home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada,comp.lang.c
- Path: news3.near.net!inmet!houdini!stt
- From: stt@houdini.camb.inmet.com (Tucker Taft)
- Subject: Re: C/C++ knocks the crap out of Ada
- X-Nntp-Posting-Host: houdini.camb.inmet.com
- Message-ID: <Do40oA.2EJ.0.-s@inmet.camb.inmet.com>
- Followup-To: comp.lang.ada,comp.lang.c
- Sender: news@inmet.camb.inmet.com (USENET news)
- Organization: Intermetrics, Inc.
- X-Newsreader: TIN [version 1.1 PL8]
- References: <TANMOY.96Mar9095253@qcd.lanl.gov>
- Date: Mon, 11 Mar 1996 15:36:10 GMT
-
- Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) wrote:
- : ...
- : And by the way, from my experience, the most common kind of errors are
- : not those that can be statically or dynamically `checked'. I did
- : occasionally have off by one errors leading to array bound violations,
- : but, by far, the more important kinds of errors were what one would
- : call `logic errors'. What I wrote made sense, and probably would have
- : made sense in every language I expressed myself, but it was not what I
- : wanted to code. ...
-
- I have heard this comment many times from people who have never
- used a compiler (like every Ada compiler) that inserts run-time
- consistency checks. However, once you use such a compiler, the
- empirical evidence is that consistency checks *do* catch many logic
- errors. The basic reason is that an "illogical" program is in most cases
- also "inconsistent" at the low level. For example, if you declare
- a subtype to have the range 0..30, an illogical program will often
- end up producing a value outside this range.
-
- I like to call it a "gauntlet" of low-level consistency checks put
- in place by the compiler. A logically correct program will have
- no trouble navigating the gauntlet of checks. An illogical program
- will in most cases get tripped up by the gauntlet, and in *my* experience,
- surprisingly close to the location of the underlying "logic" error.
-
- This is most easily demonstrated by experience. It is not easy to
- convince someone who has never tried such a compiler. You seem
- open to giving one a try, and I encourage you to do so.
-
- : tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- : Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
-
- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
- Intermetrics, Inc. Cambridge, MA USA
-